-- GENERATED SPELL FOR [Wrath Priestess] --


function spell0_18859(pUnit, Event) --@Rain of Chaos,n/a--
pUnit:FullCastSpellOnTarget(34017,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18859', 9000, 1)
end

function spell1_18859(pUnit, Event) --@Summon Fel Imp,Self--
pUnit:FullCastSpellOnTarget(36226,pUnit)
pUnit:RegisterEvent('Sorts_18859', 558, 1)
end

function Sorts_18859(pUnit, Event)
local choix_sorts_18859 = math.random(0, 1)
if choix_sorts_18859 == 0 then
pUnit:RegisterEvent('spell0_18859', 1, 1)
end
if choix_sorts_18859 == 1 then
pUnit:RegisterEvent('spell1_18859', 1, 1)
end
end

function mob18859_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18859', math.random(1500, 3000), 1)
end

function mob18859_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18859_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18859_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18859, 1, 'mob18859_Action')
RegisterUnitEvent(18859, 2, 'mob18859_Leave')
RegisterUnitEvent(18859, 3, 'mob18859_Kill')
RegisterUnitEvent(18859, 4, 'mob18859_Die')
